package com.ikangtai.shecare.personal;

import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;

import com.ikangtai.shecare.R;
import com.ikangtai.shecare.common.BaseActivity;
import com.ikangtai.shecare.common.baseView.TopBar;
import com.ikangtai.shecare.curve.WebViewCfg;

public class TestPaperHelpActivity extends BaseActivity {

    private TopBar topBar;
    private WebView webview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.record_test_paper_help);
        initView();
    }

    private void initView(){
        topBar = (TopBar) findViewById(R.id.topBar);
        topBar.setOnTopBarClickListener(new TopBar.OnTopBarClickListener() {
            @Override
            public void leftClick() {
                finish();
            }

            @Override
            public void midLeftClick() {

            }

            @Override
            public void midRightClick() {

            }

            @Override
            public void rightClick() {

            }
        });

        Intent intent = getIntent();
        String valueType = intent.getStringExtra("testPaperType");

        webview = (WebView) findViewById(R.id.webview);
        WebViewCfg webViewCfg = new WebViewCfg(webview);
        webview = webViewCfg.getCfgedWebView(this);

        if(valueType.equals("LH")){
            webview.loadUrl("http://www.ikangtai.com/ioshtml/testpaperLH.html");
        }else if(valueType.equals("HCG")){
            webview.loadUrl("http://www.ikangtai.com/ioshtml/testpaperHCG.html");
        }

    }
}
